//
//  PlaceholderTextView.h
//  imssee
//
//  Created by subai on 16/1/8.
//  Copyright © 2016年 鑫易. All rights reserved.
//

#import <UIKit/UIKit.h>
/**
 *  带默认提示的textView
 */

//PlaceholderTextView *textView = [[PlaceholderTextView alloc]init];
//textView.placeholderLabel.font = [UIFont systemFontOfSize:15];
//textView.placeholder = @"请您的晒图留言...";
//textView.font  = [UIFont systemFontOfSize:15];
//textView.frame = CGRectMake(15, 10, SCREEN_WIDTH-30, 80);
//textView.maxLength = 200;
//textView.layer.cornerRadius = 5.f;
//textView.layer.borderColor = [[UIColor grayColor]colorWithAlphaComponent:0.3].CGColor;
//textView.layer.borderWidth = 0.5f;
//[cell addSubview:textView];
//[contentText didChangeText:^(PlaceholderTextView *textView) {
//    NSLog(@"%@",textView.text);
//}];


@class PlaceholderTextView;

@interface PlaceholderTextView : UITextView<UITextViewDelegate>

@property (copy,   nonatomic) NSString *placeholder;
@property (strong, nonatomic) UILabel  *placeholderLabel;
@property (strong, nonatomic) UILabel  *wordNumLabel;
@property (assign, nonatomic) NSInteger maxLength;//最大长度

//文字输入
@property (copy, nonatomic) void(^didChangeText)(PlaceholderTextView *textView);
- (void)didChangeText:(void(^)(PlaceholderTextView *textView))block;

@end
